<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="/WEB-INF/c.tld" %>
<c:if test="${obj != null}">
<form action="${contextPath }/shoppingCart/createOrder.do" method="post">
<div>
	<table width="80%" align="center" border="1" bordercolor="#CCC">
	<caption>购物车</caption>
	<tr align="center" height="30">
		<td>产品名称</td><td>产品价格</td><td>产品数量</td><td>小计</td>
	</tr>
	<c:set var="total" value="0"/>
	<c:forEach items="${obj}" var="o">
		<tr align="center" height="30"><td>${o.product.productName } </td>
			<td>${o.product.price }</td>
			<td>${o.productnum }</td>
			<td>${o.productnum * o.product.price }</td>
			<c:set var="total" value="${total + o.productnum * o.product.price }"/>
		</tr>
	</c:forEach>
	<tr height="30">
		<td colspan="3" align="right">总计</td><td align="center">￥ ${total }</td>
	</tr>
	</table>
</div>
<div style="margin-left:75px;margin-top:30px;line-height:26px;">
	
	<h3>收货人信息:</h3>
	<p>收货地址：<span style="color:red">* </span><input name="o.address"  style="width:300px;"/></p>
	<p>收&nbsp;&nbsp;获&nbsp;&nbsp;人：<span style="color:red">* </span><input name="o.man" style="width:300px;"/></p>
	<p>联系电话：<span style="color:red">* </span><input name="o.phone" style="width:300px;"/></p>
</div>
<div style="margin-left:75px;line-height:26px;">
	备注（发票抬头，及其他注意事项）<span style="color:red">* </span><br>
	<textarea name="o.tip" cols="60" rows="5"></textarea>
</div>
<div style="margin-left:75px;line-height:26px;">
	<button type="submit">提交订单</button>
</div>
</form>
</c:if>
<c:if test="${obj == null}">
	<center><h3>您购物车中没有商品，快点去看看有没有合适的</h3></center>
</c:if>